/************************************************************************
  * Copyright(c) 2023 Levetop Semiconductor Co.,Led. All rights reserved.
  * @file     debug.h
  * @author   UartTFT Application Team
  * @version  V0.0.1
  * @date     2023-01-01
  * @brief    
 *************************************************************************/

#ifndef _DEBUG_H
#define _DEBUG_H

#include "type.h"
#include "sys.h"
#include "stdio.h"
#include "memmap.h"
#include "uart_drv.h"
#include "module_select.h"

#define DEBUG

/* Exported macro ------------------------------------------------------------*/
#ifdef DEBUG
/*******************************************************************************
 * Macro Name     : assert_param
 * Description    : The assert_param macro is used for function's parameters check.
 *                  It is used only if the library is compiled in DEBUG mode.
 * Input          : - expr: If expr is false, it calls assert_failed function
 *                    which reports the name of the source file and the source
 *                    line number of the call that failed.
 *                    If expr is true, it returns no value.
 * Return         : None
 *******************************************************************************/
#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
/* Exported functions ------------------------------------------------------- */
extern void assert_failed(uint8_t *file, uint32_t line);
#else
#define assert_param(expr) ((void)0)
#endif /* DEBUG */

extern void UART_Debug_Init(UART_TypeDef *UARTx, uint32_t pclk, uint32_t bound);

#endif /* _DEBUG_H */
